﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MyopicScheduler
{
    public class Task
    {
        public Task()
        {
            ResourceLocks = new List<ResourceLock>();
        }

        public int ReadyTime { get; set; }
        public int CompTime { get; set; }
        public int Deadline { get; set; }
        public int ProcessorNum { get; set; }
        public List<ResourceLock> ResourceLocks { get; set; }
    }

    public class ResourceLock
    {
        public int ResourceNum { get; set; }
        public ResourceLockType Type { get; set; }
    }

    public enum ResourceLockType
    {
        Shared, Exclusive
    }

    public class TaskSet
    {
        public TaskSet()
        {
            Tasks = new List<Task>();
        }

        public int NumProcessors { get; set; }
        public int NumResources { get; set; }
        public List<Task> Tasks { get; set; }
    }

    public class SimulationData
    {
        public SimulationData()
        {
            TaskSets = new List<TaskSet>();
        }

        public List<TaskSet> TaskSets { get; set; }
    }
}
